package com.cyys.modules.generator.service;

import com.cyys.common.ql.AR;
import com.cyys.common.services.CyysBaseService;
import com.cyys.modules.core.sysParam.GeneratorUtil;
import com.cyys.modules.generator.dao.GeneratorConfigureDao;
import com.cyys.modules.generator.model.GeneratorConfigure;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("generatorConfigureService")
@Transactional(readOnly = true)
public class GeneratorConfigureService extends CyysBaseService<GeneratorConfigureDao, GeneratorConfigure> {

    /**
     * 保存对象，
     *
     * @param entity
     * @return  AjaxJson
     */
    @Transactional(readOnly = false)
    public AR update(GeneratorConfigure entity) {
        dao.updateById(entity);
        GeneratorUtil.modify(entity);
        return AR.ok("更新成功");
    }

}
